package com.baoyi.widget;


import android.content.Context;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.baoyi.content.content;
import com.baoyi.doamin.WorkItem;
import com.baoyi.landscape.R;

public class ListLinearLayout extends LinearLayout {
  private WorkItem workItem;
	public ListLinearLayout(Context context,WorkItem item) {
		super(context);
		workItem=item;
		init();
		
	}

	public void init() {
		LayoutInflater.from(getContext()).inflate(R.layout.worklist_item, this);
		imageView=(RemoteImageView)findViewById(R.id.worklistimage);
		String url = content.server + workItem.getSmallmageurl();
		imageView.setImageUrl(url);
		textView1=(TextView)findViewById(R.id.worklistcon);
		textView1.setText(workItem.getLastcomments());
		textView2=(TextView)findViewById(R.id.worklistnum);
		textView2.setText("评论数："+workItem.getScore());

	}
  private RemoteImageView imageView;
  private TextView textView1;
  private TextView textView2;
  
}
